package com.peanut.pojo.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

/**
 * @author chenhs
 * @date 2021/4/11
 */
@Controller
@Scope("singleton")
public class User {
	@Value("peanut") //注入属性
	private  String name;
	
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	@Override
	public String toString() {
		return "User{" + "name='" + name + '\'' + '}';
	}
}
